/*示例 10-20：一个 longest 函数的实现，它返回两个字符串 slice 中较长者，现在还不能编译 */
fn main() {
    let str1 = "Hello, worlddddddddddd!";
    let str2 = "abc";
    let result = longest(str1, str2);
    println!("最长的字符串是：{}", result);
}
fn longest<'lefttime1>(s1: &'lefttime1 str, s2: &'lefttime1 str) -> &'lefttime1 str {
    if s1.len() > s2.len() {
        s1
    } else {
        s2
    }
}
